package Month11.Day22;

import java.io.*;


import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        System.out.println("输入名字");
        String s = in.next();
        InputStreamReader ir = new InputStreamReader(new FileInputStream("D:\\中国玩家\\水浒传.txt"), "GBK");
        BufferedReader br = new BufferedReader(ir);
        String s1 = null;
        while ((s1 = br.readLine()) != null) {
            if (s1.indexOf("·") > 0) {
                String s2[] = s1.split("·");
                for (int i = 0; i < s2.length; i++) {
                    if (s2[i].equals(s)) {
                        System.out.println(s2[0] + "·" + s2[1]);

                    }
                }

            }


            br.close();
        }
    }
}
